package tgc.edu.tms.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.tms.custom.CommonService;
import tgc.edu.tms.entity.Profession;
import tgc.edu.tms.repository.ProfessionRepository;
@Service
public class ProfessionService extends CommonService<Profession, Integer>{
	@Autowired
	private ProfessionRepository professionDAO;

	public List<String> findAllYear() {
		return professionDAO.findAllYear();
	}

	public List<String> findCollegeByYear(String value) {
		return professionDAO.findCollegeByYear(value);
	}

	public List<String> findProfessionByYearAndCollege(String college, String years) {
		return professionDAO.findProfessionByYearAndCollege(college, years);
	}

	
	public Profession findByYearAndCollegeAndProfesion(String year,String college,String profesion) {
		return professionDAO.findByYearAndCollegeAndProfesion(year,college,profesion);
		
	}
	public List<String> findProfesionByYear(String year) {
		return professionDAO.findProfesionByYear(year);
		
	}

	public Integer findIdByProfesionAndYear(String major,String years) {
		return professionDAO.findIdByProfesionAndYear(major,years);
		
	}


	public List<Profession> findByprofessionyear() {
		
		return professionDAO.findByprofessionyear();
	}

	public List<Profession> findAllyear() {
		return professionDAO.findAllyear();
	}

	public List<Profession> findByYear(String year) {
		return professionDAO.findByYear(year);
	}


	public Profession findByyearAndprofesion(String year, String profesion) {
		return professionDAO.findByyearAndprofesion(year,profesion);
	}

	public void insertSomeYear() {
		/*professionDAO.insertSomeYear();*/
		
	}

	public List<Profession> findByCollegeAndYear(String college,String year) {
		return professionDAO.findByCollegeAndYear(college,year);
		
	}

	public void insert(String year, String college, String profesion) {
		professionDAO.insert(year,college,profesion);
		
	}

	public List<String> findAllCollege(String year) {
		return professionDAO.findCollegeByYear(year);
	}

	public List<Profession> findByYearAndCollege(String year, String college) {
		return professionDAO.findByYearAndCollege(year,college);
	}

	public List<Profession> findYear(String year) {
		return professionDAO.findYear(year);
	}

	public Profession findByYearAndCollegeAndProfesionAndCode(String year, String college, String profesion, String code) {
		return professionDAO.findByYearAndCollegeAndProfesionAndCode(year,college,profesion,code);

	}
	
}
